package com.example.buildermode.three;

/**
 * @version 1.0.0
 * @className: BookBuilder
 * @description: 具体建造者
 * @author: zhangjunfa
 * @date: 2022/6/12 15:44
 */
public class BookBuilder implements Builder {
    public Product book = new Book();


    @Override
    public void recruiting() {
        book.setAuthor("J.K.罗琳著小说");
    }

    @Override
    public void writeScript() {
        book.setWorkName("哈利·波特与魔法石");
    }

    @Override
    public void raiseFunds() {
        book.setFunds(10000);
    }

    @Override
    public void propagate() {
        book.setContent("最畅销的的魔幻小说！");
    }

    @Override
    public void released() {
        book.setWorkType("小说");
    }

    @Override
    public Product buildProduct() {
        return book;
    }
}
